/*
 * Creation : 27/09/2013
 */
/**
 * 
 */
package com.japcatalog.service.impl;

import java.util.Collection;

import com.japcatalog.dao.CatalogDao;
import com.japcatalog.dao.impl.CatalogDaoImpl;
import com.japcatalog.model.Catalog;
import com.japcatalog.service.CatalogService;

/**
 * The Class CatalogServiceImpl.
 * 
 * @author Fernando Ariel Perelli
 */
public class CatalogServiceImpl implements CatalogService {

	/** The catalog dao. */
	private CatalogDao catalogDao = new CatalogDaoImpl();

	/**
	 * Getter catalogDao.
	 * 
	 * @return the catalogDao
	 */
	public CatalogDao getCatalogDao() {
		return catalogDao;
	}

	/**
	 * Setter catalogDao.
	 * 
	 * @param catalogDao
	 *            the catalogDao to set
	 */
	public void setCatalogDao(CatalogDao catalogDao) {
		this.catalogDao = catalogDao;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#findById(java.lang.Long)
	 */
	@Override
	public Catalog findById(Long id) {
		return this.catalogDao.findById(id);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#findALL()
	 */
	@Override
	public Collection<Catalog> findALL() {
		return this.catalogDao.findAll();
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#create(com.japcatalog.model.Catalog)
	 */
	@Override
	public Long create(Catalog catalog) {
		return this.catalogDao.create(catalog);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#update(com.japcatalog.model.Catalog)
	 */
	@Override
	public void update(Catalog catalog) {
		this.catalogDao.update(catalog);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#delete(com.japcatalog.model.Catalog)
	 */
	@Override
	public void delete(Catalog catalog) {
		this.catalogDao.delete(catalog);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.service.CatalogService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		this.catalogDao.delete(id);

	}

}
